<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="{ADMIN_THEME}images/reset.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/system.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/dialog.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/main.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/switchbox.css" rel="stylesheet" type="text/css" />
<link href="{ADMIN_THEME}images/table_form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="{ADMIN_THEME}js/jquery.min.js"></script>
<title>admin</title>
</head>
<body style="font-weight: normal;">
<div class="subnav">
	<div class="content-menu ib-a blue line-x">
		<a href="{url('admin/user/')}"><em>{lang('a-use-5')}</em></a><span>|</span>
		<a href="{url('admin/user/add')}" class="on"><em>{lang('a-use-6')}</em></a>
	</div>
	<div class="bk10"></div>
	<div class="table-list">
		<form action="" method="post">
		<input name="userid" type="hidden" value="{$data['userid']}">
		<table width="100%" class="table_form">
		<tr>
			<th width="200">{lang('a-user')}： </th>
			<td>{if $data['username']} {$data['username']} {else}<input class="input-text" type="text" name="username" value="" size="30"/>{/if}</td>
		</tr>
		<tr>
			<th>{lang('a-pass')}： </th>
			<td><input class="input-text" type="password" name="password" value="" size="30"/><div class="onShow">{lang('a-use-10')}</div></td>
		</tr>
		<tr>
			<th>{lang('a-use-11')}： </th>
			<td><input class="input-text" type="text" name="realname" value="{$data['realname']}" size="30"/></td>
		</tr>
		<tr>
			<th>Email： </th>
			<td><input class="input-text" type="text" name="email" value="{$data['email']}" size="30"/></td>
		</tr>
		<tr>
			<th>{lang('a-use-7')}： </th>
			<td><select name="roleid">
			{loop $role $t}
			<option value="{$t['roleid']}" {if $data['roleid']== $t['roleid']}selected{/if}>{$t['rolename']}</option>
			{/loop}
			</select>
			</td>
		</tr>
		<tr>
			<th>{lang('a-sit-20')}： </th>
			<td><select name="site">
			<option value=""> -- </option>
			{loop $sites $sid=>$t}
			<option value="{$sid}" {if $data['site']== $sid}selected{/if}>{$t['SITE_NAME']}</option>
			{/loop}
			</select>
			</td>
		</tr>
		<tr>
			<th>{lang('a-use-12')}： </th>
			<td>
			<table>
				{if !empty($menu)}
				{loop $menu $k=>$t}
				<tr>
					<td width="140">{lang('a-name')}：<input class="input-text" type="text" name="menu[name][{$k}]" value="{$t['name']}" size="10"/></td>
					<td>{lang('a-address')}：<input class="input-text" type="text" name="menu[url][{$k}]" value="{$t['url']}" size="50"/></td>
					<td><a href="javascript:add_menu();">{lang('a-add')}</a></td>
				</tr>
				{/loop}
				{else}
				<tr>
					<td width="140">{lang('a-name')}：<input class="input-text" type="text" name="menu[name][]" value="" size="10"/></td>
					<td>{lang('a-address')}：<input class="input-text" type="text" name="menu[url][]" value="" size="50"/></td>
					<td><a href="javascript:add_menu();">{lang('a-add')}</a></td>
				</tr>
				{/if}
				<tbody id="menu_body">
				</tbody>
			</table>
			</td>
		</tr>
		<tr>
			<th>&nbsp;</th>
			<td><input class="button" type="submit" name="submit" value="{lang('a-submit')}" /></td>
		</tr>
		</table>
		</form>
	</div>
</div>
<script type="text/javascript">
function add_menu() {
    var data = '<tr><td width="140">{lang('a-name')}：<input class="input-text" type="text" name="menu[name][]" value="" size="10"/></td><td>{lang('a-address')}：<input class="input-text" type="text" name="menu[url][]" size="50"/></td><td>&nbsp;</td></tr>';
	$('#menu_body').append(data);
}
</script>
</body>
</html>